
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>

<div id="container">
	<div id="main">
    	
 <?php
	require_once("tuyenxe.php");
	class application{
		public function run(){
			$module=$_GET["module"];
			if($module =="") $module="tuyenxe";
			switch($module){
				case "xe" :
					header("Location: xe.php");
					break;
				case "tuyenxe" :
					$tuyen= new tuyenxeController();				
					$list=$tuyen->run();
					echo '<table>';
        			echo '<tr>
        				<th>id</th>
						<th>ten_tuyen</th>		
						<th>tramkhoihanh</th>
						<th>tramdich</th>
						<th>thoigian</th>
						<th>giatien</th>
						<th>hanhdong</th>
						</tr>';
					foreach($list as $keys){
						$id_tuyen=$keys['id_tuyen'];
						$ten_tuyen=$keys['ten_tuyen'];
						$tramkhoihanh=$keys['tramkhoihanh'];
						$tramdich=$keys['tramdich'];
						$thoigian=$keys['thoigian'];
						$giatien=$keys['giatien'];
						echo '<tr>';
						echo ' <td>'.$id_tuyen.'</td>';
						echo ' <td>'.$ten_tuyen.'</td>';
						echo ' <td>'.$tramkhoihanh.'</td>';
						echo ' <td>'.$tramdich.'</td>';
						echo ' <td>'.$thoigian.'</td>';
						echo ' <td>'.$giatien.'</td>';
						echo ' <td><a href="?module=tuyenxe&action=insert" ><img src="plus.PNG" /></a> <a href="#"><img src="edit.PNG" /></a> <a href="#" ><img src="delete.PNG" />';
						echo '</tr>';
					}
					echo '</table>';
					break;
			}
				
		}
	}	
?>     
        
        	
	</div>
</div>


</body>
</html>